{php include wl_template('common/header-base')}
	<div class="row" style="border-top: 4px solid #44b549;background-color: #fff;border-bottom: 1px solid #d9dadc;">
		<div class="col-xs-12 col-sm-3 col-lg-2">
			<div style="height: 60px;background: transparent url({TG_URL_WRES}images/cabinet_logo.jpg) center center no-repeat;background-color: white;"></div>
		</div>
		<div class="col-xs-12 col-sm-9 col-lg-10">
			<div class="navbar navbar-default" style="margin-bottom: 0px;background-color: #FFFFFF;border-color: #FFFFFF;border: 0px solid transparent;">
				<div class="container-fluid">
				<ul class="nav navbar-nav">
					<li><a href="{url 'home/welcome/ext' array('m' => TG_NAME)}"><i class="fa fa-home"></i> 作业柜管理</a> </li>
					{loop $top_menus $topmenus}
					<li {if $_GPC['do'] == $topmenus['active']}class="active"{/if}><a href="{$topmenus['url']}">{$topmenus['title']}</a></li>
					{/loop}
			    </ul>
				<ul class="nav navbar-nav navbar-right">
					<li class="dropdown">
						<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" style="display:block; max-width:200px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; "><img src="{php echo tomedia('headimg_'.$_W['acid'].'.jpg')}?time={php echo time()}" class="img-responsive img-thumbnail" width="30" onerror="this.src='resource/images/gw-wx.gif'"/>  {$_W['account']['name']} <b class="caret"></b></a>
						<ul class="dropdown-menu">
							{if $_W['role'] != 'operator'}
							<li><a href="{url 'account/post' array('uniacid' => $_W['uniacid'])}" target="_blank"><i class="fa fa-weixin fa-fw"></i> 编辑当前账号资料</a></li>
							{/if}
							<li><a href="{url 'account/display'}" target="_blank"><i class="fa fa-cogs fa-fw"></i> 管理其它公众号</a></li>
							<li><a href="{url 'utility/emulator'}" target="_blank"><i class="fa fa-mobile fa-fw"></i> 模拟测试</a></li>
						</ul>
					</li>
					<li class="dropdown">
						<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" style="display:block; max-width:185px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; "><i class="fa fa-user"></i>  {$_W['user']['username']} ({if $_W['role'] == 'founder'}系统管理员{elseif $_W['role'] == 'manager'}公众号管理员{else}公众号操作员{/if}) <b class="caret"></b></a>
						<ul class="dropdown-menu">
							<li><a href="{url 'user/profile/profile'}" target="_blank"><i class="fa fa-weixin fa-fw"></i> 我的账号</a></li>
							{if $_W['role'] != 'operator'}
							<li class="divider"></li>
							<li><a href="{url 'system/welcome'}" target="_blank"><i class="fa fa-sitemap fa-fw"></i> 系统选项</a></li>
							<li><a href="{url 'system/welcome'}" target="_blank"><i class="fa fa-cloud-download fa-fw"></i> 自动更新</a></li>
							<li><a href="{url 'system/updatecache'}" target="_blank"><i class="fa fa-refresh fa-fw"></i> 更新缓存</a></li>
							<li class="divider"></li>
							{/if}
							<li><a href="{url 'user/logout'}"><i class="fa fa-sign-out fa-fw"></i> 退出系统</a></li>
						</ul>
					</li>
				</ul>
				</div>
			</div>
		</div>
	</div>
	<div class="container-fluid" style="margin-top: 36px;margin-bottom: 88px;min-height: 700px;max-width: 1400px;">
		{if defined('IN_MESSAGE')}
		<div class="jumbotron clearfix alert alert-{$label}">
			<div class="row">
				<div class="col-xs-12 col-sm-3 col-lg-2">
					<i class="fa fa-5x fa-{if $label=='success'}check-circle{/if}{if $label=='danger'}times-circle{/if}{if $label=='info'}info-circle{/if}{if $label=='warning'}exclamation-triangle{/if}"></i>
				</div>
				<div class="col-xs-12 col-sm-8 col-md-9 col-lg-10">
					{if is_array($msg)}
						<h2>MYSQL 错误：</h2>
						<p>{php echo cutstr($msg['sql'], 300, 1);}</p>
						<p><b>{$msg['error'][0]} {$msg['error'][1]}：</b>{$msg['error'][2]}</p>
					{else}
					<h2>{$caption}</h2>
					<p>{$msg}</p>
					{/if}
					{if $redirect}
					<p><a href="{$redirect}">如果你的浏览器没有自动跳转，请点击此链接</a></p>
					<script type="text/javascript">
						setTimeout(function () {
							location.href = "{$redirect}";
						}, 3000);
					</script>
					{else}
						<p>[<a href="javascript:history.go(-1);">点击这里返回上一页</a>] &nbsp; [<a href="./?refresh">首页</a>]</p>
					{/if}
				</div>
		{else}
		<div class="row">
			{php $frames = empty($frames) ? $GLOBALS['frames'] : $frames; _calc_current_frames2($frames);}
			{if !empty($frames)}
				<div class="col-xs-12 col-sm-3 col-lg-2 big-menu" style="padding-right: 0px;">
					{loop $frames $k $frame}
					<div class="panel panel-default">
						<div class="panel-heading">
							<h4 class="panel-title">{$frame['title']}</h4>
						</div>
						<ul class="list-group collapse in" id="frame-{$k}">
							{loop $frame['items'] $link}
							{if !empty($link['append'])}
							<li class="list-group-item {$link['active']}" onclick="window.location.href = '{$link['url']}';" style="cursor:pointer;padding-left: 40px;" kw="{$link['title']}">
								{$link['title']}
								<a class="pull-right" href="{$link['append']['url']}">{$link['append']['title']}</a>
							</li>
							{else}
							<a class="list-group-item {$link['active']}" href="{$link['url']}" kw="{$link['title']}" style="padding-left: 40px;">{$link['title']}</a>
							{/if}
							{/loop}
						</ul>
					</div>
					{/loop}
				</div>
				<div class="col-xs-12 col-sm-9 col-lg-10">
				<style>
					.topNav{border-bottom-color: rgb(0, 0, 0);border-bottom-width: 0.1em;border-bottom-style: inset;}
					.panel-heading {padding: 14px 15px;}
					.panel>.list-group .list-group-item {border-width: 0px 0;}
					.panel-title {color: #8d8d8d;}
					.navbar-nav>li>a {line-height: 30px;}
					body {background: #e7e8eb;overflow-x:hidden;}
					.list-group .list-group-item.active{background-color:#44b549;border-color:#44b549;}
					.home .footer a:hover{color:#44b549;}
					.nav.nav-tabs{border-color:#44b549;}
					.nav-tabs>li>a:hover{border-color:#eee #eee #44b549 #eee;}
					.nav-tabs>li.active>a, .nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus{background-color:#44b549; border-color:#44b549;}
					.modal-dialog .avatar-browser{color:#44b549;}
					.modal-dialog .avatar-browser .thumbnail:hover{border-color:#44b549;}
					.modal-dialog .avatar-browser{color:#44b549;}
					.modal-dialog .avatar-browser .thumbnail:hover{border-color:#44b549;}
					.notice-show h5{color:#44b549; border-left:3px solid #44b549; padding-left:15px;}
					.nav-tabs>li>a {color: black;border-radius: 0 0 0 0;}
					.nav{background-color: white;}
					#tips-container {position: fixed;top: 50%;left: 0;width: 100%;display: none;z-index: 99999;}
					#tips-container span {display:inline-block; padding:10px 40px; background:rgba(0,0,0,0.8); color:#fff; border-radius:4px;}
					a, a:hover, a:focus { text-decoration: none; cursor: pointer;}
					thead {background-color: #f4f5f9;}
					.table>thead>tr>th {border-bottom: 0px solid #ddd;}
					/*util.popover*/
					.mall-popover{position:absolute; top: 0; left: 0; z-index: 1060; padding: 9px 14px; text-align: left; white-space: normal; background-color: #fff; -webkit-background-clip: padding-box; background-clip: padding-box; border: 1px solid rgba(0,0,0,.2); border-radius: 6px; -webkit-box-shadow: 2px 1px 3px rgba(0,0,0,.2); box-shadow: 2px 1px 3px rgba(0,0,0,.2)}
					.mall-popover .arrow,.mall-popover .arrow:after{width: 0; height: 0; border-style: solid; position: absolute;}
					.mall-popover .arrow:after{content: "";}
					.mall-popover.top .arrow,.mall-popover.top .arrow:after{border-width: 10px 8px 0 8px; border-color:rgba(0,0,0,.2) transparent  transparent transparent; left: 50%; bottom:-11px; margin-left:-9px;}
					.mall-popover.top .arrow:after{border-top-color: #fff; left:1px; top: -12px;}
					.mall-popover.right .arrow,.mall-popover.right .arrow:after{border-width: 8px 10px 8px 0; border-color: transparent rgba(0,0,0,.2) transparent transparent; left: -11px; top: 50%; margin-top:-8px;}
					.mall-popover.right .arrow:after{border-right-color: #fff; left: 2px; top:0;}
					.mall-popover.bottom .arrow,.mall-popover.bottom .arrow:after{border-width: 0 8px 10px 8px; border-color:transparent transparent rgba(0,0,0,.4) transparent; left: 50%; top:-11px; margin-left:-9px;}
					.mall-popover.bottom .arrow:after{border-bottom-color:#fff; left:1px; top:1px;}
					.mall-popover.left .arrow,.mall-popover.left .arrow:after{border-width: 8px 0 8px 10px; border-color: transparent transparent transparent rgba(0,0,0,.2); right:-11px; top: 50%; margin-top:-8px;}
					.mall-popover.left .arrow:after{border-left-color: #fff; left: -12px; top: 0px;}
					.mall-popover.top{margin-bottom:10px;}
					.mall-popover.right{margin-left:10px;}
					.mall-popover.bottom{margin-top:10px;}
					.mall-popover.left{margin-right:10px;}
					.btn.min-width {min-width: 104px;}
					.scrollLoading{background:url({TG_URL_WRES}images/loading.gif) no-repeat center center;}
					.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:hover, .navbar-default .navbar-nav>.active>a:focus {color: #f60;background-color: #e7e7e7;border-bottom: 2px solid transparent;border-color: #f60;}
				</style>
			{else}
				<div>
			{/if}
		{/if}